#include<stdio.h>
#include<signal.h>
#include<stdlib.h>
#include<pthread.h>
void sig_sleep()
{
		;
}

void sleep_sig(unsigned num)
    {
		alarm(1);
		struct sigaction new_action;
		struct sigaction old_action;
		new_action.sa_handler=sig_sleep;
		new_action.sa_flags=0;
		sigemptyset(&new_action.sa_mask);
		sigaction(SIGALRM,&new_action,&old_action);
		alarm(num);
		pause();
		alarm(0);
		sigaction(SIGALRM,&old_action,NULL);
	}
int main()
{
	while(1)
	{
		sleep_sig(4);
		printf("weeking...\n");
	}

	return 0;
}
